package com.eureka.pay.controller;

import com.eureka.pay.service.impl.WeChatPayCallbackServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @Description: 微信支付回调
 * @Author: lixing
 * @Date: 2021/7/8 15:29
 */
@Controller
@RequestMapping(("weChatPayCallback"))
public class WeChatPayCallbackController {
    @Autowired
    private WeChatPayCallbackServiceImpl weChatPayCallbackService;

    /**
     * @Description 支付成功异步回调
     * @Author lixing
     * @Date 2021/7/8 15:40
     * @Param [request, response]
     */
    @PostMapping("notifyUrl")
    public void notifyUrl(HttpServletRequest request, HttpServletResponse response) throws Exception {
        weChatPayCallbackService.notifyUrl(request, response);
    }
}
